package com.jr.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController   //这个控制器类下的所有方法，返回值都是json格式的响应主体
                  //自动给当前类下的所有方法添加@ResponseBody注解
@RequestMapping("demo")
public class DemoController {

    @RequestMapping("/getval")
    public String text01(){
        return "admir";
    }
}
